<?php
namespace app\common\validate;

use app\common\validate\BaseValidate;

/**
 * 登录
 */
class Auth extends BaseValidate {
    protected $rule = [
        'username' => 'require|isNotEmpty|length:2,15',
        'password' => 'require|isNotEmpty|length:6,15',
    ];

    protected $message = [
        'username' => '账号是必须的且不能为空',
        'username.length' => '账号长度必须2至15位',
        'password' => '密码是必须的且不能为空',
        'password.length' => '密码长度必须6至12位'
    ];

    protected $scene = [
        'sign' => ['username','password']
    ];
}